/**
 * Created by zhang_renyang on 15/1/3.
 */

var dateUtils = require('../utils/dateUtils');
var settings = require('../settings');
var mongoose = require('mongoose');

var categorySchema = new mongoose.Schema({
        name:{type:String},
        type:{type:Number,default:1},
        parent_id:{type:mongoose.Schema.ObjectId,ref:'Category'},
        create_time:{type:Date,default:Date.now},
        update_time:{type:Date,default:Date.now},
        order_by:{type:Number,default:0}
    },{collection:'category'});

var categoryModel = mongoose.model('Category',categorySchema);


module.exports = categoryModel;

